package ihm.models.events;

import java.util.EventObject;

import characters.Characters;

/**
 * This event is use to notify that the character changed.
 * @author Baptiste Legrand & Benjamin Orman
 * @version 1.0
 */
public class CharacterChangedEvent
    extends EventObject {
  /**
   * Serial Version Value.
   */
  private static final long serialVersionUID = 1L;
  /**
   * The new character.
   */
  private Characters newCharacter;
  /**
   * Create an event used to notify that the character has been changed by the
   * character given in parameter.
   * @param source - The source of this event
   * @param newCharacter - The new character.
   */
  public CharacterChangedEvent(Object source, Characters newCharacter)
  {
    super(source);
    this.newCharacter = newCharacter;
  }
  /**
   * Getter returning the new character.
   * @return Characters - The new character.
   */
  public Characters getNewCharacter()
  {
    return this.newCharacter;
  }
}